3.1264 \(\int \frac{(a+b \tan ^{-1}(c x))^2}{d+e x^2} \, dx\)

Optimal. Leaf size=460 \[ -\frac{i b \left (a+b \tan ^{-1}(c x)\right ) \text{PolyLog}\left (2,1-\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}-i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}}+\frac{i b \left (a+b \tan ^{-1}(c x)\right ) \text{PolyLog}\left (2,1-\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}+i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}}+\frac{b^2 \text{PolyLog}\left (3,1-\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}-i \sqrt{e}\right )}\right )}{4 \sqrt{-d} \sqrt{e}}-\frac{b^2 \text{PolyLog}\left (3,1-\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}+i \sqrt{e}\right )}\right )}{4 \sqrt{-d} \sqrt{e}}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}-i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}}-\frac{\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}+i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}} \]

[Out]

((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*Sqrt[-d]*S
qrt[e]) - ((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*
Sqrt[-d]*Sqrt[e]) - ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*
Sqrt[e])*(1 - I*c*x))])/(Sqrt[-d]*Sqrt[e]) + ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt
[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(Sqrt[-d]*Sqrt[e]) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqr
t[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(4*Sqrt[-d]*Sqrt[e]) - (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] +
Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(4*Sqrt[-d]*Sqrt[e])

________________________________________________________________________________________

Rubi [A]  time = 0.246568, antiderivative size = 460, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {4914, 4858} \[ -\frac{i b \left (a+b \tan ^{-1}(c x)\right ) \text{PolyLog}\left (2,1-\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}-i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}}+\frac{i b \left (a+b \tan ^{-1}(c x)\right ) \text{PolyLog}\left (2,1-\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}+i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}}+\frac{b^2 \text{PolyLog}\left (3,1-\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}-i \sqrt{e}\right )}\right )}{4 \sqrt{-d} \sqrt{e}}-\frac{b^2 \text{PolyLog}\left (3,1-\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}+i \sqrt{e}\right )}\right )}{4 \sqrt{-d} \sqrt{e}}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}-i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}}-\frac{\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{(1-i c x) \left (c \sqrt{-d}+i \sqrt{e}\right )}\right )}{2 \sqrt{-d} \sqrt{e}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])^2/(d + e*x^2),x]

[Out]

((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*Sqrt[-d]*S
qrt[e]) - ((a + b*ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*
Sqrt[-d]*Sqrt[e]) - ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*
Sqrt[e])*(1 - I*c*x))])/(Sqrt[-d]*Sqrt[e]) + ((I/2)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt
[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(Sqrt[-d]*Sqrt[e]) + (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqr
t[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(4*Sqrt[-d]*Sqrt[e]) - (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] +
Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(4*Sqrt[-d]*Sqrt[e])

Rule 4914

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a
+ b*ArcTan[c*x])^p, (d + e*x^2)^q, x], x] /; FreeQ[{a, b, c, d, e}, x] && IntegerQ[q] && IGtQ[p, 0]

Rule 4858

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])^2*Log[2/
(1 - I*c*x)])/e, x] + (Simp[((a + b*ArcTan[c*x])^2*Log[(2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e, x] + Sim
p[(I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - 2/(1 - I*c*x)])/e, x] - Simp[(I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 -
 (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e, x] - Simp[(b^2*PolyLog[3, 1 - 2/(1 - I*c*x)])/(2*e), x] + Simp
[(b^2*PolyLog[3, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/(2*e), x]) /; FreeQ[{a, b, c, d, e}, x] && Ne
Q[c^2*d^2 + e^2, 0]

Rubi steps

\begin{align*} \int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{d+e x^2} \, dx &=\int \left (\frac{\sqrt{-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt{-d}-\sqrt{e} x\right )}+\frac{\sqrt{-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt{-d}+\sqrt{e} x\right )}\right ) \, dx\\ &=-\frac{\int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt{-d}-\sqrt{e} x} \, dx}{2 \sqrt{-d}}-\frac{\int \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt{-d}+\sqrt{e} x} \, dx}{2 \sqrt{-d}}\\ &=\frac{\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{\left (c \sqrt{-d}-i \sqrt{e}\right ) (1-i c x)}\right )}{2 \sqrt{-d} \sqrt{e}}-\frac{\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{\left (c \sqrt{-d}+i \sqrt{e}\right ) (1-i c x)}\right )}{2 \sqrt{-d} \sqrt{e}}-\frac{i b \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (1-\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{\left (c \sqrt{-d}-i \sqrt{e}\right ) (1-i c x)}\right )}{2 \sqrt{-d} \sqrt{e}}+\frac{i b \left (a+b \tan ^{-1}(c x)\right ) \text{Li}_2\left (1-\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{\left (c \sqrt{-d}+i \sqrt{e}\right ) (1-i c x)}\right )}{2 \sqrt{-d} \sqrt{e}}+\frac{b^2 \text{Li}_3\left (1-\frac{2 c \left (\sqrt{-d}-\sqrt{e} x\right )}{\left (c \sqrt{-d}-i \sqrt{e}\right ) (1-i c x)}\right )}{4 \sqrt{-d} \sqrt{e}}-\frac{b^2 \text{Li}_3\left (1-\frac{2 c \left (\sqrt{-d}+\sqrt{e} x\right )}{\left (c \sqrt{-d}+i \sqrt{e}\right ) (1-i c x)}\right )}{4 \sqrt{-d} \sqrt{e}}\\ \end{align*}

Mathematica [F]  time = 180.002, size = 0, normalized size = 0. \[ \text{\$Aborted} \]

Verification is Not applicable to the result.

[In]

Integrate[(a + b*ArcTan[c*x])^2/(d + e*x^2),x]

[Out]

$Aborted

________________________________________________________________________________________

Maple [B]  time = 0.359, size = 2600, normalized size = 5.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently impl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(1/2)-I/c*a*b*(c^2*e*d)^(1/2)/e/d*arctan(c*x)*ln(1-(c^2*d-e)*(
1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d+2*(c^2*e*d)^(1/2)-e))-1/2/c*b^2*(c^2*e*d)^(1/2)/e/d*arctan(c*x)*polylog(2,(c^2*
d-e)*(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d+2*(c^2*e*d)^(1/2)-e))+1/3/c*b^2/d/(c^4*d^2-2*c^2*d*e+e^2)*arctan(c*x)^3*(
c^2*e*d)^(1/2)*e-1/c*a*b*(c^2*e*d)^(1/2)/e/d*arctan(c*x)^2-1/2/c*a*b*(c^2*e*d)^(1/2)/e/d*polylog(2,(c^2*d-e)*(
1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d+2*(c^2*e*d)^(1/2)-e))+1/3*c^3*b^2/e/(c^4*d^2-2*c^2*d*e+e^2)*arctan(c*x)^3*(c^2*
e*d)^(1/2)*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \arctan \left (c x\right )^{2} + 2 \, a b \arctan \left (c x\right ) + a^{2}}{e x^{2} + d}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b^2*arctan(c*x)^2 + 2*a*b*arctan(c*x) + a^2)/(e*x^2 + d), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \operatorname{atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))**2/(e*x**2+d),x)

[Out]

Integral((a + b*atan(c*x))**2/(d + e*x**2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{e x^{2} + d}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))^2/(e*x^2+d),x, algorithm="giac")

[Out]

integrate((b*arctan(c*x) + a)^2/(e*x^2 + d), x)